//表单验证事件封装
import type { RuleType } from "async-validator";
import type { FormItemRule } from "element-plus"; //表单验证规则类型

/**
 * 手机号码验证
 * 用于表单验证
 */

/**
 * 账户名验证
 */

/**
 * 密码验证
 */

/**
 * 构建表单验证规则
 * @var ruleName 规则名:required=必填,mobile=手机号,account=账户,password=密码,varName=变量名,number、integer、float、date、url、email
 * @var title 验证项的标题
 * @var trigger 自定义验证触发方式
 * @var message 自定义验证错误消息
 */
export const validatorType = {
  required: "必填",
  mobile: "联系电话",
  account: "账户名",
  password: "密码",
  varName: "变量名",
  url: "URL",
  email: "邮箱地址",
  date: "日期",
  number: "数字",
  integer: "整数",
  float: "浮点数",
};
